package cn.rui.pojo;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

/**
 * 记录日志
 * @author 徽州大都督
 * @date 2020/8/13
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("sys_log")
public class SysLog implements Serializable {

    @TableId(type = IdType.AUTO)
    private Integer id;
    //访问用户
    private String username;
    //操作描述
    private String operation;
    //操作时间/毫秒
    private Integer time;
    //访问路径
    private String method;
    //访问ip
    private String ip;
    //操作时间
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone="GMT+8")
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    //请求状态 1正常  0异常
    private Integer type;
    //状态描述

    private String typeStr;

    //账号类型
    @TableField(exist = false)
    private String adminStr;

    //在数据库中的条数
    @TableField(exist = false)
    private Long total;
}
